package com.kuangstudy.io.test;

import java.io.*;

/**
 * ClassName: Demo4
 * date: 2021/07/16 22:06:36
 *
 * @author zlk
 */
public class Demo4 {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("e:\\a.txt"),"gbk");
        char[] bytes = new char[1024];
        int len = 0;
        while ((len = isr.read(bytes))!=-1){
            System.out.println(new String(bytes,0,len));
        }
        isr.close();
    }
}
